<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <?= $show_code; ?>
        <title><?php echo $this->config->item('title_page'); ?></title>
    </head>
    <body>
        <div class="panel panel-default body-contain">
            <div class="panel-heading"><span class="glyphicon glyphicon-user"></span>
                <strong> การจัดการพนักงานขับรถ (Driver Management)</strong>
            </div>
            <div class="panel-body">
                <?php $this->load->view('contains/menu_module_bar'); ?>
                <div class="panel panel-default">
                    <div class="panel-heading"><span class="glyphicon glyphicon-file"></span>
                        <strong> แก้ไขข้อมูลพนักงานขับรถ</strong>
                    </div>
                    <?php echo form_open_multipart('driver/edit_driver/validate', 'class="form-horizontal"  method="post"') ?>
                    <?= $hid_id; ?>
                    <div class="panel-body">
                        <div class="pull-left col-xs-12 col-md-8">
                            <!--<div class="alert alert-danger" role="alert"><?php // echo validation_errors(); ?></div>-->
                            <div class="form-group">
                                <label class="col-sm-3 control-label">คำนำหน้า</label>
                                <div class="col-sm-6">
                                    <?php echo $cmb_prefix; ?>
                                    <?php echo $err_prefix; ?>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">ชื่อ</label>
                                <div class="col-sm-9">
                                    <?php echo $txt_fname; ?> 
                                     <?php echo $err_fname; ?>
                                </div>
                                
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">นามสกุล</label>
                                <div class="col-sm-9">
                                    <?php echo $txt_lname; ?> 
                                     <?php echo $err_lname; ?>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">ชื่อเล่น</label>
                                <div class="col-sm-9">
                                    <?php echo $txt_nname; ?> 
                                     <?php echo $err_nname; ?>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">เลขบัตรประชาชน</label>
                                <div class="col-sm-9">
                                    <?php echo $txt_citizenId; ?> 
                                     <?php echo $err_citizenId; ?>
                                </div>
                            </div>
                            <div class="form-group">
                                <div>
                                    <label class="col-sm-3 control-label">วันเกิด</label>
                                    <div class="col-sm-2">
                                        <?php echo $cmb_day; ?>
                                    </div>
                                    <div class="col-sm-3">
                                        <?php echo $cmb_month; ?>
                                    </div>
                                    <div class="col-sm-2">
                                        <?php echo $cmb_year; ?>
                                    </div>
                                </div>
                                <div>
                                    <label class="col-sm-3 control-label"></label>
                                    <div class="col-sm-5">
                                        <?php echo $err_day; ?>
                                        <?php echo $err_month; ?>
                                        <?php echo $err_year; ?>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">ที่อยู่</label>
                                <div class="col-sm-9">
                                    <?php echo $txt_address; ?>
                                     <?php echo $err_address; ?>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">จังหวัด</label>
                                <div class="col-sm-6">
                                    <?php echo $cmb_province; ?>
                                     <?php echo $err_province; ?>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">รหัสไปรษณีย์</label>
                                <div class="col-sm-6">
                                    <?php echo $txt_postcode; ?> 
                                     <?php echo $err_postcode; ?>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">เบอร์โทรติดต่อ</label>
                                <div class="col-sm-9">
                                    <?php echo $txt_telephone; ?> 
                                     <?php echo $err_telephone; ?>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-offset-6">
                                    <button type="submit" class="btn btn-primary">บันทึกข้อมูล</button>
                                    <button type="button" class="btn btn-default" onclick="location.href = '<?= base_url(); ?>driver/home'">ย้อนกลับ</button>
                                </div>
                            </div>

                        </div>
                        <div class="pull-left col-xs-6 col-md-4">
                            <div class="panel panel-default">
                                <div class="panel-heading"><span class="glyphicon glyphicon-asterisk"></span>
                                    <strong> สถานะของพนักงาน</strong>
                                </div>
                                <div class="panel-body">
                                    <div class="form-group">
                                        <div class="col-sm-9">
                                            <?php echo $cmb_status; ?>
                                             <?php echo $err_status; ?>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="pull-left col-xs-6 col-md-4">
                            <div class="panel panel-default">
                                <div class="panel-heading"><span class="glyphicon glyphicon-picture"></span>
                                    <strong> อัพโหดภาพถ่าย</strong>
                                </div>
                                <div class="panel-body">
                                    <div class="form-group text-center" >
                                        <?php echo $img_picture; ?>
                                        <br><br>
                                        <?php echo $upload_pic; ?>
                                        <?php if(isset($err_upload)){ echo $err_upload;} ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <?php echo form_close(); ?>
                </div>
            </div>
        </div>
    </body>
</html>
